# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl Math-Calculus-GaussElimination.t'

use Test::More tests => 3;
use Math::Cephes::Matrix qw/mat/;
BEGIN { use_ok('Math::Calculus::GaussElimination') };

my $m = [ [3, 2,  4],
          [1, 1,  2],
          [4, 3, -2]];
my $gaussElim = Math::Calculus::GaussElimination->new(
    matrix => $m,
    vector => [ 1, 2, 3 ]
);
diag( "Iterations: " . $gaussElim->iteration_estimate );
my ($m, $b) = (mat($gaussElim->matrix), $gaussElim->vector);
my $x = $m->simq($b);
my $newx = $gaussElim->run;

ok($gaussElim->validate, "initial validation (true)");
ok($x->[0] == $newx->[0]);

#########################

# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.

